/* 
 * Copyright 2005-2008 Samuel Mello & Eduardo Schnell
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; version 2 or later of the License.
 * 
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 * 
 */

/*
 * HelpLicense.java
 *
 * Created on 22 November 2006, 23:19
 */

package datasoul.help;

import java.io.IOException;
import java.io.InputStream;

/**
 *
 * @author  samuelm
 */
public class HelpLicense extends javax.swing.JPanel {
    
    /**
	 * 
	 */
	private static final long serialVersionUID = 5165469081956820910L;
	/** Creates new form HelpLicense */
    public HelpLicense() {
        initComponents();
        
        StringBuffer sb = new StringBuffer();
        InputStream gplis = getClass().getResourceAsStream("gpl.txt");
        int i;
        try {
            while ( (i=gplis.read()) > 0 ){
                sb.append((char)i);
            }
            gplis.close();
        } catch (IOException ex) {
            ex.printStackTrace();
        }
        txtGPL.setText(sb.toString());
        txtGPL.setCaretPosition(0);
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        txtGPL = new javax.swing.JTextArea();

        txtGPL.setColumns(20);
        txtGPL.setEditable(false);
        txtGPL.setRows(5);
        jScrollPane1.setViewportView(txtGPL);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextArea txtGPL;
    // End of variables declaration//GEN-END:variables
    
}

